3.392 \(\int \tan ^2(x) \sqrt{a+b \tan ^4(x)} \, dx\)

Optimal. Leaf size=643 \[ \frac{a^{3/4} \left (\sqrt{a}+\sqrt{b} \tan ^2(x)\right ) \sqrt{\frac{a+b \tan ^4(x)}{\left (\sqrt{a}+\sqrt{b} \tan ^2(x)\right )^2}} \text{EllipticF}\left (2 \tan ^{-1}\left (\frac{\sqrt [4]{b} \tan (x)}{\sqrt [4]{a}}\right ),\frac{1}{2}\right )}{3 \sqrt [4]{b} \sqrt{a+b \tan ^4(x)}}+\frac{\sqrt [4]{b} (a+b) \left (\sqrt{a}+\sqrt{b} \tan ^2(x)\right ) \sqrt{\frac{a+b \tan ^4(x)}{\left (\sqrt{a}+\sqrt{b} \tan ^2(x)\right )^2}} \text{EllipticF}\left (2 \tan ^{-1}\left (\frac{\sqrt [4]{b} \tan (x)}{\sqrt [4]{a}}\right ),\frac{1}{2}\right )}{2 \sqrt [4]{a} \left (\sqrt{a}-\sqrt{b}\right ) \sqrt{a+b \tan ^4(x)}}-\frac{\sqrt [4]{b} \left (\sqrt{a}-\sqrt{b}\right ) \left (\sqrt{a}+\sqrt{b} \tan ^2(x)\right ) \sqrt{\frac{a+b \tan ^4(x)}{\left (\sqrt{a}+\sqrt{b} \tan ^2(x)\right )^2}} \text{EllipticF}\left (2 \tan ^{-1}\left (\frac{\sqrt [4]{b} \tan (x)}{\sqrt [4]{a}}\right ),\frac{1}{2}\right )}{2 \sqrt [4]{a} \sqrt{a+b \tan ^4(x)}}-\frac{1}{2} \sqrt{a+b} \tan ^{-1}\left (\frac{\sqrt{a+b} \tan (x)}{\sqrt{a+b \tan ^4(x)}}\right )+\frac{1}{3} \tan (x) \sqrt{a+b \tan ^4(x)}-\frac{\sqrt{b} \tan (x) \sqrt{a+b \tan ^4(x)}}{\sqrt{a}+\sqrt{b} \tan ^2(x)}+\frac{\sqrt [4]{a} \sqrt [4]{b} \left (\sqrt{a}+\sqrt{b} \tan ^2(x)\right ) \sqrt{\frac{a+b \tan ^4(x)}{\left (\sqrt{a}+\sqrt{b} \tan ^2(x)\right )^2}} E\left (2 \tan ^{-1}\left (\frac{\sqrt [4]{b} \tan (x)}{\sqrt [4]{a}}\right )|\frac{1}{2}\right )}{\sqrt{a+b \tan ^4(x)}}-\frac{\left (\sqrt{a}+\sqrt{b}\right ) (a+b) \left (\sqrt{a}+\sqrt{b} \tan ^2(x)\right ) \sqrt{\frac{a+b \tan ^4(x)}{\left (\sqrt{a}+\sqrt{b} \tan ^2(x)\right )^2}} \Pi \left (-\frac{\left (\sqrt{a}-\sqrt{b}\right )^2}{4 \sqrt{a} \sqrt{b}};2 \tan ^{-1}\left (\frac{\sqrt [4]{b} \tan (x)}{\sqrt [4]{a}}\right )|\frac{1}{2}\right )}{4 \sqrt [4]{a} \sqrt [4]{b} \left (\sqrt{a}-\sqrt{b}\right ) \sqrt{a+b \tan ^4(x)}} \]

[Out]

-(Sqrt[a + b]*ArcTan[(Sqrt[a + b]*Tan[x])/Sqrt[a + b*Tan[x]^4]])/2 + (Tan[x]*Sqrt[a + b*Tan[x]^4])/3 - (Sqrt[b
]*Tan[x]*Sqrt[a + b*Tan[x]^4])/(Sqrt[a] + Sqrt[b]*Tan[x]^2) + (a^(1/4)*b^(1/4)*EllipticE[2*ArcTan[(b^(1/4)*Tan
[x])/a^(1/4)], 1/2]*(Sqrt[a] + Sqrt[b]*Tan[x]^2)*Sqrt[(a + b*Tan[x]^4)/(Sqrt[a] + Sqrt[b]*Tan[x]^2)^2])/Sqrt[a
 + b*Tan[x]^4] + (a^(3/4)*EllipticF[2*ArcTan[(b^(1/4)*Tan[x])/a^(1/4)], 1/2]*(Sqrt[a] + Sqrt[b]*Tan[x]^2)*Sqrt
[(a + b*Tan[x]^4)/(Sqrt[a] + Sqrt[b]*Tan[x]^2)^2])/(3*b^(1/4)*Sqrt[a + b*Tan[x]^4]) - ((Sqrt[a] - Sqrt[b])*b^(
1/4)*EllipticF[2*ArcTan[(b^(1/4)*Tan[x])/a^(1/4)], 1/2]*(Sqrt[a] + Sqrt[b]*Tan[x]^2)*Sqrt[(a + b*Tan[x]^4)/(Sq
rt[a] + Sqrt[b]*Tan[x]^2)^2])/(2*a^(1/4)*Sqrt[a + b*Tan[x]^4]) + (b^(1/4)*(a + b)*EllipticF[2*ArcTan[(b^(1/4)*
Tan[x])/a^(1/4)], 1/2]*(Sqrt[a] + Sqrt[b]*Tan[x]^2)*Sqrt[(a + b*Tan[x]^4)/(Sqrt[a] + Sqrt[b]*Tan[x]^2)^2])/(2*
a^(1/4)*(Sqrt[a] - Sqrt[b])*Sqrt[a + b*Tan[x]^4]) - ((Sqrt[a] + Sqrt[b])*(a + b)*EllipticPi[-(Sqrt[a] - Sqrt[b
])^2/(4*Sqrt[a]*Sqrt[b]), 2*ArcTan[(b^(1/4)*Tan[x])/a^(1/4)], 1/2]*(Sqrt[a] + Sqrt[b]*Tan[x]^2)*Sqrt[(a + b*Ta
n[x]^4)/(Sqrt[a] + Sqrt[b]*Tan[x]^2)^2])/(4*a^(1/4)*(Sqrt[a] - Sqrt[b])*b^(1/4)*Sqrt[a + b*Tan[x]^4])

________________________________________________________________________________________

Rubi [A]  time = 0.49573, antiderivative size = 643, normalized size of antiderivative = 1., number of steps used = 12, number of rules used = 9, integrand size = 17, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.529, Rules used = {3670, 1336, 195, 220, 1209, 1198, 1196, 1217, 1707} \[ \frac{a^{3/4} \left (\sqrt{a}+\sqrt{b} \tan ^2(x)\right ) \sqrt{\frac{a+b \tan ^4(x)}{\left (\sqrt{a}+\sqrt{b} \tan ^2(x)\right )^2}} F\left (2 \tan ^{-1}\left (\frac{\sqrt [4]{b} \tan (x)}{\sqrt [4]{a}}\right )|\frac{1}{2}\right )}{3 \sqrt [4]{b} \sqrt{a+b \tan ^4(x)}}-\frac{1}{2} \sqrt{a+b} \tan ^{-1}\left (\frac{\sqrt{a+b} \tan (x)}{\sqrt{a+b \tan ^4(x)}}\right )+\frac{1}{3} \tan (x) \sqrt{a+b \tan ^4(x)}-\frac{\sqrt{b} \tan (x) \sqrt{a+b \tan ^4(x)}}{\sqrt{a}+\sqrt{b} \tan ^2(x)}+\frac{\sqrt [4]{b} (a+b) \left (\sqrt{a}+\sqrt{b} \tan ^2(x)\right ) \sqrt{\frac{a+b \tan ^4(x)}{\left (\sqrt{a}+\sqrt{b} \tan ^2(x)\right )^2}} F\left (2 \tan ^{-1}\left (\frac{\sqrt [4]{b} \tan (x)}{\sqrt [4]{a}}\right )|\frac{1}{2}\right )}{2 \sqrt [4]{a} \left (\sqrt{a}-\sqrt{b}\right ) \sqrt{a+b \tan ^4(x)}}-\frac{\sqrt [4]{b} \left (\sqrt{a}-\sqrt{b}\right ) \left (\sqrt{a}+\sqrt{b} \tan ^2(x)\right ) \sqrt{\frac{a+b \tan ^4(x)}{\left (\sqrt{a}+\sqrt{b} \tan ^2(x)\right )^2}} F\left (2 \tan ^{-1}\left (\frac{\sqrt [4]{b} \tan (x)}{\sqrt [4]{a}}\right )|\frac{1}{2}\right )}{2 \sqrt [4]{a} \sqrt{a+b \tan ^4(x)}}+\frac{\sqrt [4]{a} \sqrt [4]{b} \left (\sqrt{a}+\sqrt{b} \tan ^2(x)\right ) \sqrt{\frac{a+b \tan ^4(x)}{\left (\sqrt{a}+\sqrt{b} \tan ^2(x)\right )^2}} E\left (2 \tan ^{-1}\left (\frac{\sqrt [4]{b} \tan (x)}{\sqrt [4]{a}}\right )|\frac{1}{2}\right )}{\sqrt{a+b \tan ^4(x)}}-\frac{\left (\sqrt{a}+\sqrt{b}\right ) (a+b) \left (\sqrt{a}+\sqrt{b} \tan ^2(x)\right ) \sqrt{\frac{a+b \tan ^4(x)}{\left (\sqrt{a}+\sqrt{b} \tan ^2(x)\right )^2}} \Pi \left (-\frac{\left (\sqrt{a}-\sqrt{b}\right )^2}{4 \sqrt{a} \sqrt{b}};2 \tan ^{-1}\left (\frac{\sqrt [4]{b} \tan (x)}{\sqrt [4]{a}}\right )|\frac{1}{2}\right )}{4 \sqrt [4]{a} \sqrt [4]{b} \left (\sqrt{a}-\sqrt{b}\right ) \sqrt{a+b \tan ^4(x)}} \]

Antiderivative was successfully verified.

[In]

Int[Tan[x]^2*Sqrt[a + b*Tan[x]^4],x]

[Out]

-(Sqrt[a + b]*ArcTan[(Sqrt[a + b]*Tan[x])/Sqrt[a + b*Tan[x]^4]])/2 + (Tan[x]*Sqrt[a + b*Tan[x]^4])/3 - (Sqrt[b
]*Tan[x]*Sqrt[a + b*Tan[x]^4])/(Sqrt[a] + Sqrt[b]*Tan[x]^2) + (a^(1/4)*b^(1/4)*EllipticE[2*ArcTan[(b^(1/4)*Tan
[x])/a^(1/4)], 1/2]*(Sqrt[a] + Sqrt[b]*Tan[x]^2)*Sqrt[(a + b*Tan[x]^4)/(Sqrt[a] + Sqrt[b]*Tan[x]^2)^2])/Sqrt[a
 + b*Tan[x]^4] + (a^(3/4)*EllipticF[2*ArcTan[(b^(1/4)*Tan[x])/a^(1/4)], 1/2]*(Sqrt[a] + Sqrt[b]*Tan[x]^2)*Sqrt
[(a + b*Tan[x]^4)/(Sqrt[a] + Sqrt[b]*Tan[x]^2)^2])/(3*b^(1/4)*Sqrt[a + b*Tan[x]^4]) - ((Sqrt[a] - Sqrt[b])*b^(
1/4)*EllipticF[2*ArcTan[(b^(1/4)*Tan[x])/a^(1/4)], 1/2]*(Sqrt[a] + Sqrt[b]*Tan[x]^2)*Sqrt[(a + b*Tan[x]^4)/(Sq
rt[a] + Sqrt[b]*Tan[x]^2)^2])/(2*a^(1/4)*Sqrt[a + b*Tan[x]^4]) + (b^(1/4)*(a + b)*EllipticF[2*ArcTan[(b^(1/4)*
Tan[x])/a^(1/4)], 1/2]*(Sqrt[a] + Sqrt[b]*Tan[x]^2)*Sqrt[(a + b*Tan[x]^4)/(Sqrt[a] + Sqrt[b]*Tan[x]^2)^2])/(2*
a^(1/4)*(Sqrt[a] - Sqrt[b])*Sqrt[a + b*Tan[x]^4]) - ((Sqrt[a] + Sqrt[b])*(a + b)*EllipticPi[-(Sqrt[a] - Sqrt[b
])^2/(4*Sqrt[a]*Sqrt[b]), 2*ArcTan[(b^(1/4)*Tan[x])/a^(1/4)], 1/2]*(Sqrt[a] + Sqrt[b]*Tan[x]^2)*Sqrt[(a + b*Ta
n[x]^4)/(Sqrt[a] + Sqrt[b]*Tan[x]^2)^2])/(4*a^(1/4)*(Sqrt[a] - Sqrt[b])*b^(1/4)*Sqrt[a + b*Tan[x]^4])

Rule 3670

Int[((d_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*((c_.)*tan[(e_.) + (f_.)*(x_)])^(n_))^(p_.), x_Symbol]
 :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Dist[(c*ff)/f, Subst[Int[(((d*ff*x)/c)^m*(a + b*(ff*x)^n)^p)/(c^
2 + ff^2*x^2), x], x, (c*Tan[e + f*x])/ff], x]] /; FreeQ[{a, b, c, d, e, f, m, n, p}, x] && (IGtQ[p, 0] || EqQ
[n, 2] || EqQ[n, 4] || (IntegerQ[p] && RationalQ[n]))

Rule 1336

Int[((f_.)*(x_))^(m_.)*((d_) + (e_.)*(x_)^2)^(q_.)*((a_) + (c_.)*(x_)^4)^(p_.), x_Symbol] :> Int[ExpandIntegra
nd[(f*x)^m*(d + e*x^2)^q*(a + c*x^4)^p, x], x] /; FreeQ[{a, c, d, e, f, m, p, q}, x] && (IGtQ[p, 0] || IGtQ[q,
 0] || IntegersQ[m, q])

Rule 195

Int[((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[(x*(a + b*x^n)^p)/(n*p + 1), x] + Dist[(a*n*p)/(n*p + 1),
 Int[(a + b*x^n)^(p - 1), x], x] /; FreeQ[{a, b}, x] && IGtQ[n, 0] && GtQ[p, 0] && (IntegerQ[2*p] || (EqQ[n, 2
] && IntegerQ[4*p]) || (EqQ[n, 2] && IntegerQ[3*p]) || LtQ[Denominator[p + 1/n], Denominator[p]])

Rule 220

Int[1/Sqrt[(a_) + (b_.)*(x_)^4], x_Symbol] :> With[{q = Rt[b/a, 4]}, Simp[((1 + q^2*x^2)*Sqrt[(a + b*x^4)/(a*(
1 + q^2*x^2)^2)]*EllipticF[2*ArcTan[q*x], 1/2])/(2*q*Sqrt[a + b*x^4]), x]] /; FreeQ[{a, b}, x] && PosQ[b/a]

Rule 1209

Int[((a_) + (c_.)*(x_)^4)^(p_)/((d_) + (e_.)*(x_)^2), x_Symbol] :> -Dist[(e^2)^(-1), Int[(c*d - c*e*x^2)*(a +
c*x^4)^(p - 1), x], x] + Dist[(c*d^2 + a*e^2)/e^2, Int[(a + c*x^4)^(p - 1)/(d + e*x^2), x], x] /; FreeQ[{a, c,
 d, e}, x] && NeQ[c*d^2 + a*e^2, 0] && IGtQ[p + 1/2, 0]

Rule 1198

Int[((d_) + (e_.)*(x_)^2)/Sqrt[(a_) + (c_.)*(x_)^4], x_Symbol] :> With[{q = Rt[c/a, 2]}, Dist[(e + d*q)/q, Int
[1/Sqrt[a + c*x^4], x], x] - Dist[e/q, Int[(1 - q*x^2)/Sqrt[a + c*x^4], x], x] /; NeQ[e + d*q, 0]] /; FreeQ[{a
, c, d, e}, x] && PosQ[c/a]

Rule 1196

Int[((d_) + (e_.)*(x_)^2)/Sqrt[(a_) + (c_.)*(x_)^4], x_Symbol] :> With[{q = Rt[c/a, 4]}, -Simp[(d*x*Sqrt[a + c
*x^4])/(a*(1 + q^2*x^2)), x] + Simp[(d*(1 + q^2*x^2)*Sqrt[(a + c*x^4)/(a*(1 + q^2*x^2)^2)]*EllipticE[2*ArcTan[
q*x], 1/2])/(q*Sqrt[a + c*x^4]), x] /; EqQ[e + d*q^2, 0]] /; FreeQ[{a, c, d, e}, x] && PosQ[c/a]

Rule 1217

Int[1/(((d_) + (e_.)*(x_)^2)*Sqrt[(a_) + (c_.)*(x_)^4]), x_Symbol] :> With[{q = Rt[c/a, 2]}, Dist[(c*d + a*e*q
)/(c*d^2 - a*e^2), Int[1/Sqrt[a + c*x^4], x], x] - Dist[(a*e*(e + d*q))/(c*d^2 - a*e^2), Int[(1 + q*x^2)/((d +
 e*x^2)*Sqrt[a + c*x^4]), x], x]] /; FreeQ[{a, c, d, e}, x] && NeQ[c*d^2 + a*e^2, 0] && NeQ[c*d^2 - a*e^2, 0]
&& PosQ[c/a]

Rule 1707

Int[((A_) + (B_.)*(x_)^2)/(((d_) + (e_.)*(x_)^2)*Sqrt[(a_) + (c_.)*(x_)^4]), x_Symbol] :> With[{q = Rt[B/A, 2]
}, -Simp[((B*d - A*e)*ArcTan[(Rt[(c*d)/e + (a*e)/d, 2]*x)/Sqrt[a + c*x^4]])/(2*d*e*Rt[(c*d)/e + (a*e)/d, 2]),
x] + Simp[((B*d + A*e)*(A + B*x^2)*Sqrt[(A^2*(a + c*x^4))/(a*(A + B*x^2)^2)]*EllipticPi[Cancel[-((B*d - A*e)^2
/(4*d*e*A*B))], 2*ArcTan[q*x], 1/2])/(4*d*e*A*q*Sqrt[a + c*x^4]), x]] /; FreeQ[{a, c, d, e, A, B}, x] && NeQ[c
*d^2 + a*e^2, 0] && NeQ[c*d^2 - a*e^2, 0] && PosQ[c/a] && EqQ[c*A^2 - a*B^2, 0]

Rubi steps

\begin{align*} \int \tan ^2(x) \sqrt{a+b \tan ^4(x)} \, dx &=\operatorname{Subst}\left (\int \frac{x^2 \sqrt{a+b x^4}}{1+x^2} \, dx,x,\tan (x)\right )\\ &=\operatorname{Subst}\left (\int \left (\sqrt{a+b x^4}-\frac{\sqrt{a+b x^4}}{1+x^2}\right ) \, dx,x,\tan (x)\right )\\ &=\operatorname{Subst}\left (\int \sqrt{a+b x^4} \, dx,x,\tan (x)\right )-\operatorname{Subst}\left (\int \frac{\sqrt{a+b x^4}}{1+x^2} \, dx,x,\tan (x)\right )\\ &=\frac{1}{3} \tan (x) \sqrt{a+b \tan ^4(x)}+\frac{1}{3} (2 a) \operatorname{Subst}\left (\int \frac{1}{\sqrt{a+b x^4}} \, dx,x,\tan (x)\right )-(a+b) \operatorname{Subst}\left (\int \frac{1}{\left (1+x^2\right ) \sqrt{a+b x^4}} \, dx,x,\tan (x)\right )+\operatorname{Subst}\left (\int \frac{b-b x^2}{\sqrt{a+b x^4}} \, dx,x,\tan (x)\right )\\ &=\frac{1}{3} \tan (x) \sqrt{a+b \tan ^4(x)}+\frac{a^{3/4} F\left (2 \tan ^{-1}\left (\frac{\sqrt [4]{b} \tan (x)}{\sqrt [4]{a}}\right )|\frac{1}{2}\right ) \left (\sqrt{a}+\sqrt{b} \tan ^2(x)\right ) \sqrt{\frac{a+b \tan ^4(x)}{\left (\sqrt{a}+\sqrt{b} \tan ^2(x)\right )^2}}}{3 \sqrt [4]{b} \sqrt{a+b \tan ^4(x)}}+\left (\sqrt{a} \sqrt{b}\right ) \operatorname{Subst}\left (\int \frac{1-\frac{\sqrt{b} x^2}{\sqrt{a}}}{\sqrt{a+b x^4}} \, dx,x,\tan (x)\right )-\left (\left (\sqrt{a}-\sqrt{b}\right ) \sqrt{b}\right ) \operatorname{Subst}\left (\int \frac{1}{\sqrt{a+b x^4}} \, dx,x,\tan (x)\right )-\frac{\left (\sqrt{a} (a+b)\right ) \operatorname{Subst}\left (\int \frac{1+\frac{\sqrt{b} x^2}{\sqrt{a}}}{\left (1+x^2\right ) \sqrt{a+b x^4}} \, dx,x,\tan (x)\right )}{\sqrt{a}-\sqrt{b}}+\frac{\left (\sqrt{b} (a+b)\right ) \operatorname{Subst}\left (\int \frac{1}{\sqrt{a+b x^4}} \, dx,x,\tan (x)\right )}{\sqrt{a}-\sqrt{b}}\\ &=-\frac{1}{2} \sqrt{a+b} \tan ^{-1}\left (\frac{\sqrt{a+b} \tan (x)}{\sqrt{a+b \tan ^4(x)}}\right )+\frac{1}{3} \tan (x) \sqrt{a+b \tan ^4(x)}-\frac{\sqrt{b} \tan (x) \sqrt{a+b \tan ^4(x)}}{\sqrt{a}+\sqrt{b} \tan ^2(x)}+\frac{\sqrt [4]{a} \sqrt [4]{b} E\left (2 \tan ^{-1}\left (\frac{\sqrt [4]{b} \tan (x)}{\sqrt [4]{a}}\right )|\frac{1}{2}\right ) \left (\sqrt{a}+\sqrt{b} \tan ^2(x)\right ) \sqrt{\frac{a+b \tan ^4(x)}{\left (\sqrt{a}+\sqrt{b} \tan ^2(x)\right )^2}}}{\sqrt{a+b \tan ^4(x)}}+\frac{a^{3/4} F\left (2 \tan ^{-1}\left (\frac{\sqrt [4]{b} \tan (x)}{\sqrt [4]{a}}\right )|\frac{1}{2}\right ) \left (\sqrt{a}+\sqrt{b} \tan ^2(x)\right ) \sqrt{\frac{a+b \tan ^4(x)}{\left (\sqrt{a}+\sqrt{b} \tan ^2(x)\right )^2}}}{3 \sqrt [4]{b} \sqrt{a+b \tan ^4(x)}}-\frac{\left (\sqrt{a}-\sqrt{b}\right ) \sqrt [4]{b} F\left (2 \tan ^{-1}\left (\frac{\sqrt [4]{b} \tan (x)}{\sqrt [4]{a}}\right )|\frac{1}{2}\right ) \left (\sqrt{a}+\sqrt{b} \tan ^2(x)\right ) \sqrt{\frac{a+b \tan ^4(x)}{\left (\sqrt{a}+\sqrt{b} \tan ^2(x)\right )^2}}}{2 \sqrt [4]{a} \sqrt{a+b \tan ^4(x)}}+\frac{\sqrt [4]{b} (a+b) F\left (2 \tan ^{-1}\left (\frac{\sqrt [4]{b} \tan (x)}{\sqrt [4]{a}}\right )|\frac{1}{2}\right ) \left (\sqrt{a}+\sqrt{b} \tan ^2(x)\right ) \sqrt{\frac{a+b \tan ^4(x)}{\left (\sqrt{a}+\sqrt{b} \tan ^2(x)\right )^2}}}{2 \sqrt [4]{a} \left (\sqrt{a}-\sqrt{b}\right ) \sqrt{a+b \tan ^4(x)}}-\frac{\left (\sqrt{a}+\sqrt{b}\right ) (a+b) \Pi \left (-\frac{\left (\sqrt{a}-\sqrt{b}\right )^2}{4 \sqrt{a} \sqrt{b}};2 \tan ^{-1}\left (\frac{\sqrt [4]{b} \tan (x)}{\sqrt [4]{a}}\right )|\frac{1}{2}\right ) \left (\sqrt{a}+\sqrt{b} \tan ^2(x)\right ) \sqrt{\frac{a+b \tan ^4(x)}{\left (\sqrt{a}+\sqrt{b} \tan ^2(x)\right )^2}}}{4 \sqrt [4]{a} \left (\sqrt{a}-\sqrt{b}\right ) \sqrt [4]{b} \sqrt{a+b \tan ^4(x)}}\\ \end{align*}

Mathematica [C]  time = 16.8358, size = 550, normalized size = 0.86 \[ \left (\frac{\tan (x)}{3}-\frac{1}{2} \sin (2 x)\right ) \sqrt{\frac{4 a \cos (2 x)+a \cos (4 x)+3 a-4 b \cos (2 x)+b \cos (4 x)+3 b}{4 \cos (2 x)+\cos (4 x)+3}}+\frac{\left (3 \sqrt{a} \sqrt{b}-2 i a-3 i b\right ) \left (\tan ^2(x)+1\right ) \sqrt{\frac{b \tan ^4(x)}{a}+1} \text{EllipticF}\left (i \sinh ^{-1}\left (\sqrt{\frac{i \sqrt{b}}{\sqrt{a}}} \tan (x)\right ),-1\right )+3 b \sqrt{\frac{i \sqrt{b}}{\sqrt{a}}} \tan ^5(x)+3 a \sqrt{\frac{i \sqrt{b}}{\sqrt{a}}} \tan (x)-3 \sqrt{a} \sqrt{b} \left (\tan ^2(x)+1\right ) \sqrt{\frac{b \tan ^4(x)}{a}+1} E\left (\left .i \sinh ^{-1}\left (\sqrt{\frac{i \sqrt{b}}{\sqrt{a}}} \tan (x)\right )\right |-1\right )+3 i a \tan ^2(x) \sqrt{\frac{b \tan ^4(x)}{a}+1} \Pi \left (-\frac{i \sqrt{a}}{\sqrt{b}};\left .i \sinh ^{-1}\left (\sqrt{\frac{i \sqrt{b}}{\sqrt{a}}} \tan (x)\right )\right |-1\right )+3 i b \tan ^2(x) \sqrt{\frac{b \tan ^4(x)}{a}+1} \Pi \left (-\frac{i \sqrt{a}}{\sqrt{b}};\left .i \sinh ^{-1}\left (\sqrt{\frac{i \sqrt{b}}{\sqrt{a}}} \tan (x)\right )\right |-1\right )+3 i a \sqrt{\frac{b \tan ^4(x)}{a}+1} \Pi \left (-\frac{i \sqrt{a}}{\sqrt{b}};\left .i \sinh ^{-1}\left (\sqrt{\frac{i \sqrt{b}}{\sqrt{a}}} \tan (x)\right )\right |-1\right )+3 i b \sqrt{\frac{b \tan ^4(x)}{a}+1} \Pi \left (-\frac{i \sqrt{a}}{\sqrt{b}};\left .i \sinh ^{-1}\left (\sqrt{\frac{i \sqrt{b}}{\sqrt{a}}} \tan (x)\right )\right |-1\right )}{3 \sqrt{\frac{i \sqrt{b}}{\sqrt{a}}} \left (\tan ^2(x)+1\right ) \sqrt{a+b \tan ^4(x)}} \]

Antiderivative was successfully verified.

[In]

Integrate[Tan[x]^2*Sqrt[a + b*Tan[x]^4],x]

[Out]

Sqrt[(3*a + 3*b + 4*a*Cos[2*x] - 4*b*Cos[2*x] + a*Cos[4*x] + b*Cos[4*x])/(3 + 4*Cos[2*x] + Cos[4*x])]*(-Sin[2*
x]/2 + Tan[x]/3) + (3*a*Sqrt[(I*Sqrt[b])/Sqrt[a]]*Tan[x] + 3*Sqrt[(I*Sqrt[b])/Sqrt[a]]*b*Tan[x]^5 + (3*I)*a*El
lipticPi[((-I)*Sqrt[a])/Sqrt[b], I*ArcSinh[Sqrt[(I*Sqrt[b])/Sqrt[a]]*Tan[x]], -1]*Sqrt[1 + (b*Tan[x]^4)/a] + (
3*I)*b*EllipticPi[((-I)*Sqrt[a])/Sqrt[b], I*ArcSinh[Sqrt[(I*Sqrt[b])/Sqrt[a]]*Tan[x]], -1]*Sqrt[1 + (b*Tan[x]^
4)/a] + (3*I)*a*EllipticPi[((-I)*Sqrt[a])/Sqrt[b], I*ArcSinh[Sqrt[(I*Sqrt[b])/Sqrt[a]]*Tan[x]], -1]*Tan[x]^2*S
qrt[1 + (b*Tan[x]^4)/a] + (3*I)*b*EllipticPi[((-I)*Sqrt[a])/Sqrt[b], I*ArcSinh[Sqrt[(I*Sqrt[b])/Sqrt[a]]*Tan[x
]], -1]*Tan[x]^2*Sqrt[1 + (b*Tan[x]^4)/a] - 3*Sqrt[a]*Sqrt[b]*EllipticE[I*ArcSinh[Sqrt[(I*Sqrt[b])/Sqrt[a]]*Ta
n[x]], -1]*(1 + Tan[x]^2)*Sqrt[1 + (b*Tan[x]^4)/a] + ((-2*I)*a + 3*Sqrt[a]*Sqrt[b] - (3*I)*b)*EllipticF[I*ArcS
inh[Sqrt[(I*Sqrt[b])/Sqrt[a]]*Tan[x]], -1]*(1 + Tan[x]^2)*Sqrt[1 + (b*Tan[x]^4)/a])/(3*Sqrt[(I*Sqrt[b])/Sqrt[a
]]*(1 + Tan[x]^2)*Sqrt[a + b*Tan[x]^4])

________________________________________________________________________________________

Maple [C]  time = 0.056, size = 537, normalized size = 0.8 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*tan(x)^4)^(1/2)*tan(x)^2,x)

[Out]

1/3*(a+b*tan(x)^4)^(1/2)*tan(x)+2/3*a/(I/a^(1/2)*b^(1/2))^(1/2)*(1-I/a^(1/2)*b^(1/2)*tan(x)^2)^(1/2)*(1+I/a^(1
/2)*b^(1/2)*tan(x)^2)^(1/2)/(a+b*tan(x)^4)^(1/2)*EllipticF(tan(x)*(I/a^(1/2)*b^(1/2))^(1/2),I)+b/(I/a^(1/2)*b^
(1/2))^(1/2)*(1-I/a^(1/2)*b^(1/2)*tan(x)^2)^(1/2)*(1+I/a^(1/2)*b^(1/2)*tan(x)^2)^(1/2)/(a+b*tan(x)^4)^(1/2)*El
lipticF(tan(x)*(I/a^(1/2)*b^(1/2))^(1/2),I)-I*b^(1/2)*a^(1/2)/(I/a^(1/2)*b^(1/2))^(1/2)*(1-I/a^(1/2)*b^(1/2)*t
an(x)^2)^(1/2)*(1+I/a^(1/2)*b^(1/2)*tan(x)^2)^(1/2)/(a+b*tan(x)^4)^(1/2)*EllipticF(tan(x)*(I/a^(1/2)*b^(1/2))^
(1/2),I)+I*b^(1/2)*a^(1/2)/(I/a^(1/2)*b^(1/2))^(1/2)*(1-I/a^(1/2)*b^(1/2)*tan(x)^2)^(1/2)*(1+I/a^(1/2)*b^(1/2)
*tan(x)^2)^(1/2)/(a+b*tan(x)^4)^(1/2)*EllipticE(tan(x)*(I/a^(1/2)*b^(1/2))^(1/2),I)-a/(I/a^(1/2)*b^(1/2))^(1/2
)*(1-I/a^(1/2)*b^(1/2)*tan(x)^2)^(1/2)*(1+I/a^(1/2)*b^(1/2)*tan(x)^2)^(1/2)/(a+b*tan(x)^4)^(1/2)*EllipticPi(ta
n(x)*(I/a^(1/2)*b^(1/2))^(1/2),I*a^(1/2)/b^(1/2),(-I/a^(1/2)*b^(1/2))^(1/2)/(I/a^(1/2)*b^(1/2))^(1/2))-b/(I/a^
(1/2)*b^(1/2))^(1/2)*(1-I/a^(1/2)*b^(1/2)*tan(x)^2)^(1/2)*(1+I/a^(1/2)*b^(1/2)*tan(x)^2)^(1/2)/(a+b*tan(x)^4)^
(1/2)*EllipticPi(tan(x)*(I/a^(1/2)*b^(1/2))^(1/2),I*a^(1/2)/b^(1/2),(-I/a^(1/2)*b^(1/2))^(1/2)/(I/a^(1/2)*b^(1
/2))^(1/2))

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \sqrt{b \tan \left (x\right )^{4} + a} \tan \left (x\right )^{2}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*tan(x)^4)^(1/2)*tan(x)^2,x, algorithm="maxima")

[Out]

integrate(sqrt(b*tan(x)^4 + a)*tan(x)^2, x)

________________________________________________________________________________________

Fricas [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*tan(x)^4)^(1/2)*tan(x)^2,x, algorithm="fricas")

[Out]

Timed out

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \sqrt{a + b \tan ^{4}{\left (x \right )}} \tan ^{2}{\left (x \right )}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*tan(x)**4)**(1/2)*tan(x)**2,x)

[Out]

Integral(sqrt(a + b*tan(x)**4)*tan(x)**2, x)

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \sqrt{b \tan \left (x\right )^{4} + a} \tan \left (x\right )^{2}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*tan(x)^4)^(1/2)*tan(x)^2,x, algorithm="giac")

[Out]

integrate(sqrt(b*tan(x)^4 + a)*tan(x)^2, x)